<template>
  <div class="myCollBox">
    <div style="margin:15px 0;">
      消息类型：
      <el-select v-model="dataForm.type" @change="()=>{this.getDataList(1)}" size="small">
        <el-option
          v-for="item in options"
          :key="item.value"
          :label="item.name"
          :value="item.value">
        </el-option>
      </el-select>
    </div>
    <div class="questionAnswerMain">
      <div class="questionAnswerList" style="border-bottom: 1px solid #e5e2e2;padding-bottom: 15px;margin-top: 20px;" v-for="(item,index) in dataList" :key="index">
        <div class="questionAnswerTitle">
          <i class="el-icon-question" style="color:#26b000;font-size:20px"></i>
          <span style="color:#9a9a9a;">吴中祥  回答了您提出的问题      2022-01-01 12:11:00</span>
        </div>
        <div style="font-size:17px;">{{item.title}}</div>
      </div>
      <div class="pagination">
        <el-pagination
          class="pagination"
          background
          :current-page="page"
          :page-sizes="[10, 20, 50, 100]"
          :page-size="limit"
          :total="total"
          layout="total, sizes, prev, pager, next, jumper"
          @size-change="pageSizeChangeHandle"
          @current-change="pageCurrentChangeHandle">
        </el-pagination>
      </div>
    </div>
  </div>
</template>
<script>
import { questionAnswerList } from './data.js'
import mixinViewModule from '@/mixins/view-module'
export default {
  mixins: [mixinViewModule],
  data () {
    return {
      questionAnswerList,
      options: [{ name: '全部', value: null }, { name: '我的咨询', value: 2 }, { name: '我的关注', value: 3 }],

      mixinViewModuleOptions: {
        getDataListURL: '/xnkt/tbnewsuser/myNewsPage',
        getDataListIsPage: true
      },
      dataForm: {
        type: null
      },
      dataList: []
    }
  },
  created () {
    this.init()
  },
  mounted () {
    window.scrollTo(0, 0)
  },

  methods: {
    init () {
      this.getDataList(1)
    },
    consultImmediately () {
      this.$router.push({ name: 'consultingService' })
    }
  }
}
</script>
<style lang="scss" src="./index.scss" scoped></style>
